package com.yr.ryjk.common;

import java.io.File;

import com.yr.ryjk.util.ConfigUtil;

/**
 * 常量类
 * @author Rick
 *
 */
public class Constant {
	public static final String ENCODING              = "UTF-8";                 //项目通用编码
	public static final String DATE_FORMAT           = "yyyy-MM-dd HH:mm:ss";   //通用时间格式
	public static final String DATE_FORMAT_YEAR      = "yyyy-MM-dd";            //通用时间格式
	
	public static final String SYSTEM_FILE_SEPARATOR = File.separator;
	public static final String WEB_SERVER_URL        = "http://"+ConfigUtil.getValue("web_server_ip"); //Apache或nginx的路径
	public static final String WEB_SERVER_PATH       = ConfigUtil.getValue("web_server_path");
	
	public static final String COIN_MD5_SECRET_KEY   = "yarun_secret_key";      //coin_md5验证所需的密钥
	
	public static final String redis_phone_checkcode_key   = "redis_phone_checkcode_key";   //checkcode存放在redis中的map的key
	public static final String redis_phone_token_key = "redis_phone_token_key";             //phone存放在redis中的map的key
	public static final String redis_token_phone_key = "redis_token_phone_key";             //token存放在redis中的map的key
	public static final String redis_phone_jpush_key = "redis_phone_jpush_key";             //极光推送存放在redis中的map的key
	public static final String redis_jpush_phone_key = "redis_jpush_phone_key";             
	public static final String redis_consult_timer_key = "redis_consult_timer_key";         //咨询倒计时
	public static final int consult_countdown_time   = Integer.parseInt(ConfigUtil.getValue("consult_countdown_time"))*60*1000; //咨询自动确认的倒计时时间,单位为分	
	public static final int consult_scan_interval    = Integer.parseInt(ConfigUtil.getValue("consult_scan_interval"))*1000;     //咨询扫描的时间间隔,单位为秒
	
	public static final int ads_default_count        = 3;  							 //返回给前端的广告的默认数量
	public static final String su_in_session         = "su_in_session";  			 //系统管理员在session中的key
	
	public static final String uid        			 = ConfigUtil.getValue("uid");   //短信发送接口账户
	public static final String ukey         		 = ConfigUtil.getValue("ukey");  //短信发送接口key
	
	public static final String app_key        	     = ConfigUtil.getValue("app_key");        //jpush激光推送接口账户
	public static final String master_secret         = ConfigUtil.getValue("master_secret");  //jpush激光推送接口key	
	
	public static final String unionpay_front_url    = ConfigUtil.getValue("unionpay_front_url");   //银联支付前台通知url
	public static final String unionpay_back_url     = ConfigUtil.getValue("unionpay_back_url");    //银联支付后台通知url	
}
